﻿<%@ Page Title="图表" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="About.aspx.cs" Inherits="WebApplication1.About" %>

<asp:Content ID="BodyContent" ContentPlaceHolderID="MainContent" runat="server">
    <style>
        #title{
            width:100%;
            height: calc(10vh);
        }
        #content1{
            width:100%;
            height: calc(70vh);
        }
        #footer{
            width:100%;
            margin-top:10px;
        }
        button{
            float:right;
            background:linear-gradient(to right,#005c97,#363795 77%);
            color:white;
            border-radius:25px;
            line-height:30px;
            width:60px;
        }
    </style>
    <h2 id="tittle"><%: Title %>.</h2>
    <div id="content1">Your application description page.</div>
    <p id="footer">可以在此查看数据曲线变化等
        <button type="button"  onclick="fresh()">刷新</button>
    </p>
    <script src="./Scripts/WebForms/jquery-3.3.1.js"></script>
    <script src="./static/js/echarts.min.js"></script>
    <script src="./static/js/dark.js"></script>
    <script src="./static/js/control.js"></script>
    <script>
        var visa = '<%=visa%>';
        var visv = '<%=visv%>';
        var visw = '<%=visw%>';
        var count = '<%=count%>';
        var visa1 = visa.split(",");
        var visv1 = visv.split(",");
        var visw1 = visw.split(",");
        console.log(visa1);
        console.log(typeof (visa1));

        function fresh() {
            option.legend.data = ['功率', '电流', '电压'];
            option.xAxis.data = ["1","2","3","4","5","6","7","8","9","10"];
            option.series[0].name = "功率";
            option.series[0].data = visw1;
            option.series[1].name = "电流";
            option.series[1].data = visa1;
            option.series[2].name = "电压";
            option.series[2].data = visv1;
            myChart.setOption(option)
        }
    </script>
</asp:Content>
